package eventStrategies.physicalModel;

import model.IPhysicalDataModel;
import eventManager.AppEvent;
import eventStrategies.IEventResponse;
import events.ECodeEventList;
import events.physicalModel.SetMagFieldEvent;

public class SetMagFieldStrategy extends IEventResponse {

	private IPhysicalDataModel physModel;
	
	public SetMagFieldStrategy(IPhysicalDataModel physModel) {
		super(ECodeEventList.SET_MAGFIELD);
		this.physModel = physModel;
	}

	@Override
	public void execute(AppEvent event) {
		SetMagFieldEvent fullEvent = (SetMagFieldEvent) event;
		physModel.setMagField(fullEvent.magField);		
	}

}
